

int main() {
	int p = 1;
	int i = 1;
	int n = 0;
	scanf("%d",&n);
	while (i <= n) {
		p = i * p;
		printf("%d! = %d\n",i,p);
		i++;
	}
	//while循环完成阶乘计算


	int i = 0;
	int j = 0;
	int n = 0;
	scanf("%d",&n);
	for (i = 1; i <= n; i++) {
		if (i == 1)
			j = i;
		else
			j = i * j;
		printf("%d! = %d\n",i,j);
	}
	//for循环完成阶乘计算


	int i = 1;
	int k = 0;
	int n = 0;
	scanf("%d",&n);
	do
	{
		if (i == 1)
			k = i;
		else
			k = i * k;
		printf("%d! = %d\n",i,k);
		i++;
	} while (i <= n);
	//do while循环完成阶乘计算


	return 0;
}

